package com.example.gsyvideo;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {
    private Button v1;
    private Button v2;
    private Button v3;
    private Button v4;
    private Button v5;
    private Button v6;
    private Button v7;
    private Button v8;
    private Button v9;
    private Button v10;
    private Button v11;

    //魅族2
//        urls.add(new GSYVideoModel("http://192.168.31.196:9000?filePath=/storage/emulated/0/Download/movie/meiyanf.mp4", "标题15"));
//        urls.add(new GSYVideoModel("http://192.168.31.196:9000/?filePath=/storage/emulated/0/Download/movie/VID_20190226_100842.mp4", "标题15"));


    String url1 = "http://192.168.31.39:9000/?filePath=/sdcard/Download/movie/v1.mp4";
    String url2 = "http://192.168.31.39:9000/?filePath=/sdcard/Download/movie/v2.mp4";
    String url3 = "http://192.168.31.39:9000/?filePath=/sdcard/Download/movie/v3.mp4";
    String url4 = "http://192.168.31.39:9000/?filePath=/sdcard/Download/movie/v4.mp4";
    String url5 = "http://192.168.31.39:9000/?filePath=/sdcard/Download/movie/v5.mp4";
    String url6 = "http://192.168.31.39:9000/?filePath=/sdcard/Download/movie/v6.mp4";
    String url7 = "http://192.168.31.39:9000/?filePath=/sdcard/Download/movie/v7.mp4";
    String url8 = "http://192.168.31.39:9000/?filePath=/sdcard/Download/movie/v8.mp4";
    String url9 = "http://192.168.31.39:9000/?filePath=/sdcard/Download/movie/v9.mp4";
    String url10 = "http://192.168.31.196:9000?filePath=/storage/emulated/0/Download/movie/meiyanf.mp4";
    String url11 = "http://192.168.31.196:9000/?filePath=/storage/emulated/0/Download/movie/VID_20190226_100842.mp4";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        v1 = findViewById(R.id.v1);
        v2 = findViewById(R.id.v2);
        v3 = findViewById(R.id.v3);
        v4 = findViewById(R.id.v4);
        v5 = findViewById(R.id.v5);
        v6 = findViewById(R.id.v6);
        v7 = findViewById(R.id.v7);
        v8 = findViewById(R.id.v8);
        v9 = findViewById(R.id.v9);
        v10 = findViewById(R.id.v10);
        v11 = findViewById(R.id.v11);

        v1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url1);
                startActivity(intent);
            }
        });
        v2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url2);
                startActivity(intent);
            }
        });
        v3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url3);
                startActivity(intent);
            }
        });
        v4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url4);
                startActivity(intent);
            }
        });
        v5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url5);
                startActivity(intent);
            }
        });
        v6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url6);
                startActivity(intent);
            }
        });
        v7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url7);
                startActivity(intent);
            }
        });
        v8.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url8);
                startActivity(intent);
            }
        });
        v9.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url9);
                startActivity(intent);
            }
        });
        v10.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url10);
                startActivity(intent);
            }
        });
        v11.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, GsyActivity.class);
                intent.putExtra("url", url11);
                startActivity(intent);
            }
        });

    }
}
